package com.conceal.client.utils;

import java.io.IOException;

import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;

public class LongSerializerProvider extends JsonSerializer<Long> {

	@Override
	public void serialize(Long value, JsonGenerator jgen, SerializerProvider sp)
			throws IOException, JsonProcessingException {
		// 将长整数用字符串表示，可以避免Javascrt精确整数最大为0x1FFFFFFFFFFFFFF的问题
		jgen.writeString(value.toString());
	}


}
